package com.example.gokchinesefoodmapmcdev.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.gokchinesefoodmapmcdev.entity.CustomerInfo;
import com.example.gokchinesefoodmapmcdev.entity.DTO.*;
import com.example.gokchinesefoodmapmcdev.entity.MerchantInfo;
import com.example.gokchinesefoodmapmcdev.entity.goods.GoodsSku;
import com.example.gokchinesefoodmapmcdev.entity.order.OrderInfo;
import com.example.gokchinesefoodmapmcdev.entity.order.OrderReturnImage;
import com.example.gokchinesefoodmapmcdev.entity.order.OrderSku;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface OrderInfoDAO extends BaseMapper<OrderInfo> {

    List<OrderInfoDTO> selectOrderList(Integer orderStatus);

    int cancelOrder(String orderNo);


    OrderDetailsDTO selectOrderInfoByOrderNo(String orderNo);

    List<GoodsInfoDTO> selectGoodsInfoByOrderNo(String orderNo);

    int updateOrderStatusByOrderNo(String orderNo);

    int deleteOrderByOrderNo(String orderNo);

    List<OrderReturnListDTO> orderReturnList();

    MerchantInfo selectMerchantInfoByMerchantId(Long merchantId);

    CustomerInfo selectCustomerInfoByCustomerId(Long customerId);

    List<OrderReturnImage> selectUrlListByReturnOrderId(Integer returnOrderId);

    OrderSkuDTO selectOrderSku(Integer returnOrderId);


    GoodsSku selectGoodSkuInfoByGoodSkuId(Integer goodSkuId);

    OrderInfo selectOrderNoByOrderSubNo(String orderSubNo);

    int insertOrderReturnInfo(@RequestParam("returnNo") String returnNo,@RequestParam("orderNo") String orderNo,@RequestParam("orderSubNo") String orderSubNo,@RequestParam("returnCustomer") Integer returnCustomer,@RequestParam("orderSn") String orderSn,@RequestParam("returnReason") String returnReason,@RequestParam("orderAmount") BigDecimal orderAmount,@RequestParam("customerId") Integer customerId,@RequestParam("gmtCreateTime") Date gmtCreateTime);

    OrderInfo selectOrderReturnInfoByOrderSubNo(String orderSubNo);

    Integer selectReturnOrderIdByOrderSubNo(String orderSubNo);

    int insertOrderReturnImage(@RequestParam("returnOrderId")Integer returnOrderId,@RequestParam("returnOrderImageUrl") String returnOrderImageUrl);

    OrderReturnDetailDTO selectOrderReturnInfoByReturnOrderId(Integer returnOrderId);

    List<OrderReturnImage> selectOrderReturnImageByReturnOrderId(Integer returnOrderId);

    GoodsSku selectGoodsSkuInfoByReturnOrderId(Integer returnOrderId);

    OrderSku selectOrderSkuInfoByReturnOrderId(Integer returnOrderId);
}
